package com.llf.Mapper;

import com.llf.Pojo.Provider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Repository
public interface  ProviderMapper {
  /**
   * 增加供应商
   * @param "provider"
   * @return
   * @throws Exception
   */
  public int addProvider(Provider provider);


   ArrayList<Provider> getProName();

  /**
   * 通过proId删除Provider
   * @param id
   * @return
   * @throws Exception
   */
  public int deleteProviderById( int id);


  /**
   * 通过proId获取Provider
   * @param id
   * @return
   * @throws Exception
   */
  public Provider getProviderById(int id);

  /**
   * 修改供应商信息
   * @param
   * @return
   * @throws Exception
   */
  public int updatePrivider(Provider provider);

  /**
   *
   * @param proCode 供应商编号
   * @param proName 供应商名字
   * @return
   */
  ArrayList<Provider> getallProvider( @Param("proCode") String proCode,@Param("proName") String proName);
}

